home *** CD-ROM | disk | FTP | other *** search
/ Champak 135 / Vol 135.iso / games / bunny_gr.swf / scripts / frame_57 / DoAction.as
Text File  |  2008-11-12  |  555b  |  24 lines

  1. if(drinks_active < MAX_ACTIVE)
  2. {
  3.    call("new_drink");
  4. }
  5. call("move_drinks");
  6. set("/:current_time",getTimer() - eval("/:start_time"));
  7. time = eval("/:MAX_TIME") - int(eval("/:current_time") / "1000");
  8. if("0" >= time)
  9. {
  10.    time = "0";
  11.    message = "Out of Time!";
  12.    gotoAndStop(146);
  13. }
  14. idle_time = getTimer() - idle_start;
  15. if(MAX_IDLE_TIME < idle_time and idle_anim == "0")
  16. {
  17.    idle_anim = "1";
  18.    idle_start = getTimer();
  19.    tellTarget("/bunny")
  20.    {
  21.       gotoAndPlay("idle" add (random(eval("/:MAX_IDLE_MOVES")) + "1"));
  22.    }
  23. }
  24.